package com.simple.gateway.center.domian.manage.bo;

import com.simple.gateway.center.basedata.po.GatewayDistribution;
import com.simple.gateway.center.domian.manage.dto.GatewayDistributionDTO;
import lombok.Data;

/**
 * 项目: simple-gateway-core
 *
 * 功能描述: 网关系统映射BO
 *
 * @author: WuChengXing
 *
 * @create: 2023-08-12 22:28
 **/
@Data
public class GatewayDistributionBO {

    /**
     * 分组标识
     */
    private String groupId;
    /**
     * 网关标识
     */
    private String gatewayId;
    /**
     * 系统标识
     */
    private String systemId;
    /**
     * 系统名称
     */
    private String systemName;

    public static GatewayDistributionBO do2Bo(GatewayDistribution gatewayDistribution) {
        GatewayDistributionBO bo = new GatewayDistributionBO();
        bo.setGroupId(gatewayDistribution.getGroupId());
        bo.setGatewayId(gatewayDistribution.getGatewayId());
        bo.setSystemId(gatewayDistribution.getSystemId());
        bo.setSystemName(gatewayDistribution.getSystemName());
        return bo;
    }

    public static GatewayDistributionDTO bo2Dto(GatewayDistributionBO bo) {
        GatewayDistributionDTO dto = new GatewayDistributionDTO();
        dto.setGroupId(bo.getGroupId());
        dto.setGatewayId(bo.getGatewayId());
        dto.setSystemId(bo.getSystemId());
        dto.setSystemName(bo.getSystemName());
        return dto;
    }

    public static GatewayDistribution bo2Do(GatewayDistributionBO bo) {
        GatewayDistribution gatewayDistribution = new GatewayDistribution();
        gatewayDistribution.setGroupId(bo.getGroupId());
        gatewayDistribution.setGatewayId(bo.getGatewayId());
        gatewayDistribution.setSystemId(bo.getSystemId());
        gatewayDistribution.setSystemName(bo.getSystemName());
        return gatewayDistribution;
    }
}
